package android.support.v4.os;

import android.net.wifi.WifiManager;
import de.robv.android.xposed.XposedHelpers;

/**
 * 禁止刷量包关闭WIFI
 *
 */
public class EWifiManager extends EHook {

	@Override
	public String getClassName() {
		return WifiManager.class.getName();
	}

	@Override
	public void hook() {

		XposedHelpers.findAndHookMethod(getClassName(), null, "setWifiEnabled",
				boolean.class, this);
	}

	@Override
	protected boolean before(String name, Object[] args, MethodHookParam param) {
//		log.w("setWifiEnabled:"+args[0]);
		args[0]=true;
		return false;
	}

}
